#include<bits/stdc++.h>
using namespace std;
const int N=505,Inf=1e9;
int n,m;
struct node{
	int a,b;
}p[N];
double f[N][N];
double calc(int x){
	memset(f,0x4f,sizeof f);f[0][0]=0;
	for(int i=1;i<=n;i++){
		for(int j=m-x;j>=0;j--){
			for(int k=min(m-j,x);k>=0;k--){
				if(j)f[j][k]=min(f[j][k],f[j-1][k]+(double)p[i].a/(1+x));
				if(k)f[j][k]=min(f[j][k],f[j][k-1]+(double)p[i].b/k);
			}
		}
	}
	return f[m-x][x];
}
double sol(){
	int l=0,r=m;
	double ans=Inf;
	while(l<r){
		int mid1=(2*l+r)/3,mid2=(l+2*r)/3;
		double cnt1=calc(mid1),cnt2=calc(mid2);
		ans=min(ans,cnt1),ans=min(ans,cnt2);
		if(cnt1>cnt2)l=mid1+1;
		else r=mid2-1;
	}
	return ans;
}
signed main(){
	freopen("talk.in","r",stdin);
	freopen("talk.out","w",stdout);
	scanf("%d %d",&n,&m);
	for(int i=1;i<=n;i++)
		scanf("%d %d",&p[i].a,&p[i].b);
	for(int i=1;i<=n;i++)
		if(p[i].b==-1)p[i].b=Inf;
	sort(p+1,p+n+1,[](node A,node B){return A.b<B.b;});
	double ans=sol();
	printf("%.15lf",ans);
	return 0;
}

